﻿<BadHabit_Factory_Controls:TaskPanelBase
    x:Name="taskPanel"
    x:Class="BadHabit.Factory.Controls.TaskPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BadHabit_Factory_Controls="clr-namespace:BadHabit.Factory.Controls"        
    xmlns:BadHabit_WPFTools="clr-namespace:BadHabit.WPFTools;assembly=BadHabit.WPFTools"       
    xmlns:BadHabit_Factory="clr-namespace:BadHabit.Factory"      
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    Background="Transparent"
    
    >
    
    
        
    <BadHabit_Factory_Controls:TaskPanelBase.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Paste" Executed="Paste_Executed" />  
        <CommandBinding Command="ApplicationCommands.Save" CanExecute="Save_CanExecute" Executed="Save_Executed"/>
    </BadHabit_Factory_Controls:TaskPanelBase.CommandBindings>
    
    

    <Grid x:Name="ContentPanel" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

    
        <Grid VerticalAlignment="Stretch" Grid.Row="1" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>                    
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="270"/>
                <ColumnDefinition Width="*"/>                
            </Grid.ColumnDefinitions>
            
            <DockPanel 
                Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="0">
                <!-- TOOL BAR -->
                <BadHabit_Factory_Controls:TaskToolBar
                x:Name="taskToolBar"
                IsPostItPanel="False"/>
                <Button
                        x:Name="commitButton"
                        DockPanel.Dock="Right"
                        Style="{StaticResource CommitButton}"
                        Command="ApplicationCommands.Save"
                        HorizontalAlignment="Right" 
                        Margin="5" />

            </DockPanel>
            
            
                
            <!-- BACKLOG ITEM LIST BOX -->
            <BadHabit_Factory_Controls:BacklogItemListBox                 
                x:Name="backlogItemListBox"                    
                Grid.Column="0" Grid.Row="1"                
                HorizontalAlignment="Stretch"/>

            <Border
                Grid.Column="1" Grid.Row="1"
                Style="{StaticResource RoundBorder}">

                <!-- TASKS CONTAINER -->
                <ContentControl
                x:Name="taskContainer"
                Grid.Column="1" Grid.Row="1"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch">

                    <BadHabit_Factory_Controls:TaskDataGrid                    
                        x:Name="taskDataGrid"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        
                        BacklogItemFilter="{Binding ElementName=backlogItemListBox, Path=SelectedBacklogItem}"
                        TaskSearchFilter="{Binding ElementName=taskToolBar, Path=SearchText}"                          
                        TaskBugOnlyFilter="{Binding ElementName=taskToolBar, Path=BugOnlyFilter}"
                        TaskImpedimentOnlyFilter="{Binding ElementName=taskToolBar, Path=ImpedimentOnlyFilter}"
                        
                                                
                        />
                        

                </ContentControl>



            </Border>



            <GridSplitter Grid.Column="0" Grid.Row="1" Width="1" Background="Transparent"/>
                

        </Grid>
        
           

        
        
    </Grid>
    
</BadHabit_Factory_Controls:TaskPanelBase>
